package com.zhiwen.controller;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.zhiwen.config.DemoConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("apollo")
public class HelloController {

    @Autowired
    private DemoConfig demoConfig;

    @RequestMapping("demo")
    public String hello() {
        return demoConfig.toString();
    }

}
